package com.wutoon.etl.pojo;


import com.alibaba.fastjson.JSONObject;
import lombok.Data;

/**
 * @author 武兴云/72176468
 * @version 1.0
 * @date 2024/2/27 9:52
 * @description Http到JDBC的数据传输任务配置
 */
@Data
public class Http2DbTask extends CommonTransfer2DBTask{
    private HttpCollectSourceConfig collectSource;

    private Integer collectConcurrency;

    private Integer writeConcurrency;

    @Data
    public static class HttpCollectSourceConfig {
        private String url;

        private String method;

        private JSONObject head;

        private JSONObject bodyTemplate;

        private HttpCollectParamConfig dimension;

        private HttpCollectParamConfig page;

        private HttpCollectParamConfig pageSize;

        private HttpCollectParamConfig beginTime;

        private HttpCollectParamConfig endTime;

        private String pageTotalExpression;

        private String judgeSuccessExpression;

        private String dataExpression;

        private String fieldList;

        private String system;

        private Integer secondConcurrency=20;

    }
    @Data
    public static class HttpCollectParamConfig {
        private String key;

        private String value;

        private Integer size;

        private Integer startIndex=1;

    }
}
